package algorithm.questions;

public class Coin100new {
	public static void count(int num, int alterNum, int interval) {
		boolean[] x = new boolean[num];
		for (int i = 0; i < num; i++)
			x[i] = true;
		int n = interval;
		for (int i = 0; i < alterNum; i++) {
			if (x[n])
				x[n] = false;
			else
				x[n] = true;
			n += interval + 1;
			if (n >= 100)
				n %= 100;
		}
		int trueNum = 0;
		for (int i = 0; i < num; i++)
			if (x[i])
				trueNum++;
		System.out.println("���泯�ϵĸ���Ϊ" + trueNum + "��");
	}

	public static void main(String[] args) {
		count(100, 100, 2);
	}

}
